package com.tdkj.model.shop;

import java.sql.Timestamp;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;
import com.tdkj.model.common.BeanType;
import com.tdkj.model.user.BeanUser;

/**
 * RequestToBuyMessage entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "shop_good_request_to_buy")
public class BeanGoodRequestToBuy extends BaseEntity {

	private BeanType type;
	private String description;
	
	private BeanUser user;
	private Timestamp publishTime;
	
	private String state;

	/**
	 * @return the type
	 */
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="type_id")
	public BeanType getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(BeanType type) {
		this.type = type;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the user
	 */
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="user_id")
	public BeanUser getUser() {
		return user;
	}

	/**
	 * @param user the user to set
	 */
	public void setUser(BeanUser user) {
		this.user = user;
	}

	/**
	 * @return the publishTime
	 */
	public Timestamp getPublishTime() {
		return publishTime;
	}

	/**
	 * @param publishTime the publishTime to set
	 */
	public void setPublishTime(Timestamp publishTime) {
		this.publishTime = publishTime;
	}

	/**
	 * @return the state
	 */
	public String getState() {
		return state;
	}

	/**
	 * @param state the state to set
	 */
	public void setState(String state) {
		this.state = state;
	}


}